<extend name="Public/head" />  
<block name="headscript">
	<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
	<script type="text/javascript" src="__JS__/swipe.min.js"></script>
</block>
<block name="style">
	<link rel="stylesheet" type="text/css" href="__CSS__/index.css">
</block>
<block name="headbar">
	<header class="aui-bar">
            <a href="javascript:;" class="aui-btn aui-pull-left aui-bar-info openurl" data-url="map"><span class="aui-iconfont aui-icon-locationfill"></span>南昌市</a>
            <a href="#" class="aui-btn aui-pull-right aui-bar-info"><span class="aui-iconfont aui-icon-search"></span></a>
			<div class="title">{$title}</div>
		</header>
</block>
<block name="body">
	<div class="aui-content">
        <div class="aui-header">
            <div id="slider" class="swipe" style="visibility:visible;">
                <div class="swipe-wrap">
                    <figure>
                        <div class="face faceInner">
                            <img src="__IMG__/api/01.png" width="100%" height="100%" />
                        </div>
                    </figure>
                    <figure>
                        <div class="face faceInner">
                            <img src="__IMG__/api/02.png" width="100%" height="100%" />
                        </div>
                    </figure>
                </div>
            </div>
        </div>
        <div class="container">
            <div class="aui-content">
                <ul class="aui-list-view" id="indexlist">
                    
                </ul>
            </div>
        </div>
    </div>

</block>
<block name="script">
	 <script id="dotTpl" type="text/x-dot-template">
		{{for (var key in it){ }}
				 <li class="aui-list-view-cell aui-img images-box images-box-position">
                    <div class="aui-col-xs-3 ">
                        <img class="aui-img-object aui-pull-left images" src="{{=it[key].image}}">
                    </div>
                    <div class="aui-col-xs-6 img-content-box">
                        <h4 class='images-title'>{{=it[key].title}}<span class="aui-label aui-label-info ">IMAX 3D</span></h4>
                        {{? it[key].info != null }}
                        <p>{{=it[key].info}}</p><!-- 
                        <p>{{=it[key].comment}}</p> -->
                        {{?}}
                    </div>
                    <div class="aui-col-xs-3 ">
                        <div class="image-box-rank">
                            <span>{{=it[key].greed}}</span>分
                        </div>
                        <div class="image-box-buy openurl" data-url = "buy" data-id="{{=it[key].id}}">
                            <span>购票</span>
                        </div>
                    </div>
                </li>
		{{ } }}
	</script>
    <script src="http://api.map.baidu.com/api?v=1.2" type="text/javascript"></script>  
	<script type="text/javascript" src="__JS__/doT.min.js"></script>
	<script type="text/javascript">
		var slider =
        Swipe(document.getElementById('slider'), {
            auto: 3000,
            continuous: true,
        });

         (function(){
        	var index = layer.load();
        	$.getJSON(API+'moviesIndexApi' , function(data){
					layer.close(index);
   					var evalText = doT.template($('#dotTpl').text()); 
					$('#indexlist').html(evalText(data.data));
        	}) ;
   		})(); 
	</script>
</block>